/**
 * 
 */
package com.ph.agent.api.controller;

import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

import com.alibaba.dubbo.config.annotation.Reference;
import com.ph.base.BaseController;
import com.ph.shopping.facade.agent.entity.AgentImage;
import com.ph.shopping.facade.agent.service.IAgentImageService;

/**
 * @项目：phshopping-api-platform
 *
 * @描述：
 *
 * @作者： 舒豪
 *
 * @创建时间：2017年3月9日
 *
 * @Copyright @2017 by 舒豪
 */
@RestController
@RequestMapping("api/agentImage")
public class AgentImageController extends BaseController{

	@Reference(version="1.0.0")
	private IAgentImageService iAgentImageService;

	/**
	 * 获取代理商图片列表
	 * @return
	 */
	@RequestMapping(value="/list",method= RequestMethod.GET)
	public Object getAgentLevelList(){
		return iAgentImageService.getAgentImageList();
	}

	/**
	 * 新增
	 * @param agentImage
	 * @return
	 */
	@RequestMapping(value="/add",method=RequestMethod.GET)
	public Object addAgentLevel(AgentImage agentImage){
		return iAgentImageService.addAgentImage(agentImage);
	}

	/**
	 * 修改
	 * @param agentImage
	 * @return
	 */
	@RequestMapping(value="/update",method=RequestMethod.POST)
	public Object updateAgentLevel(AgentImage agentImage){
		return iAgentImageService.updateAgentImage(agentImage);
	}

	/**
	 * 删除
	 * @param agentImage
	 * @return
	 */
	@RequestMapping(value="/delete",method=RequestMethod.POST)
	public Object deleteAgentLevel(AgentImage agentImage){
		return iAgentImageService.deleteAgentImage(agentImage);
	}

}
